<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
 
      <f:view> 
        <h:head>
            <link href="styles.css" rel="stylesheet" type="text/css"/>
            <title>
                <h:outputText value="#{messages.listarAutomovel}"/>
            </title>
        </h:head>
        <h:body>
            <h:form>
                <h:messages />
                <h:dataTable id="tabelaAuto" border="1" value="#{automovelController.listaAutomovel}" var="auto">
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="#{messages.idAutomovel}"/>
                        </f:facet>
                        <h:outputText value="#{auto.id}" />
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="#{messages.nomeAutomovel}"/>
                        </f:facet>
                        <h:outputText value="#{auto.nome}"/>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="#{messages.corAutomovel}"/>
                        </f:facet>
                        <h:outputText value="#{auto.cor}"/>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="#{messages.anoAutomovel}"/>
                        </f:facet>
                        <h:outputText value="#{auto.ano}"/>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="#{messages.modeloAutomovel}"/>
                        </f:facet>
                        <h:outputText value="#{auto.modelo}"/>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="#{messages.qntPortasAutomovel}"/>
                        </f:facet>
                        <h:outputText value="#{auto.qntPortas}"/>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="#{messages.chassiAutomovel}"/>
                        </f:facet>
                        <h:outputText value="#{auto.chassi}"/>
                    </h:column>
                     <h:column>
                    <f:facet name="header">
                        <h:outputText value="#{messages.alterar}"/>
                    </f:facet>
                    <h:commandLink value="Alterar" action="#{automovelController.alterar}">
                        <f:setPropertyActionListener value="#{auto}" target="#{automovelController.automovel}" />
                    </h:commandLink>
                </h:column>           
                <h:column>
                    <f:facet name="header">
                        <h:outputText value="#{messages.excluir}"/>
                    </f:facet>
                    <h:commandLink value="Excluir" action="#{automovelController.excluir}">
                        <f:setPropertyActionListener value="#{auto}" target="#{automovelController.automovel}" />
                    </h:commandLink>
                </h:column>
                </h:dataTable>
                <h:commandButton value="Pagina Inicial"  action="paginaInicial">
                </h:commandButton>
            </h:form>
        </h:body>
    </f:view>
</html>
